/*
 * UnregisteredCoursesSerialIterator.cpp
 *
 *  Created on: 14 May 2010
 *      Author: Savramis Sartios
 */

#include "UnregisteredCoursesSerialIterator.h"

UnregisteredCoursesSerialIterator::UnregisteredCoursesSerialIterator() {
	throw;

}

UnregisteredCoursesSerialIterator::UnregisteredCoursesSerialIterator(const IUnregisteredCourses *courses){
	courses_ =const_cast<IUnregisteredCourses*>(courses);
	setBegin(courses_->getBegin());
}
UnregisteredCoursesSerialIterator::~UnregisteredCoursesSerialIterator() {
	delete courses_;
}

bool	UnregisteredCoursesSerialIterator::first(){
	if(true){
		current_=0;
		return true;
	}
	 throw;
}

bool	UnregisteredCoursesSerialIterator::next(){
	if(true){
		current_++;
		it_++;
		return true;
	}
	throw;
}

bool	UnregisteredCoursesSerialIterator::isDone(){
	return current_>=courses_->count();
}

ICourseWithTeacher *	UnregisteredCoursesSerialIterator::getCurrent(){
	return *it_;
}

bool	UnregisteredCoursesSerialIterator::setBegin(const vector<ICourseWithTeacher *>::iterator begin){
	it_= begin;
	return true;
}
